VPN activation is triggered by clicking/touching the item, however,
the switch is reactive and blocks clicking/touching event so item won't
be activated. Manually activate item when switch is toggled to fix that.
Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/8204
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3711>
this.bind_property('is-active',
this._switch, 'state',
GObject.BindingFlags.SYNC_CREATE);
+
+ // Switch handle is reactive, so events don't propagate to the item;
+ // activate it manually in that case
+ this._switch.connect('notify::state', () => {
+ if (this.is_active === this._switch.state)
+ return;
+
+ this.activate();
+ });
+
this.bind_property('name',
this._label, 'text',
GObject.BindingFlags.SYNC_CREATE);